class ErrorMailer < ActionMailer::Base
  default from: "timesheet@knighterrant.com.au"
  
  def timesheet_warning(user_email, body)
    @error_message = body
    mail(:to => user_email, :subject => 'KE Timesheet Watcher - WARNINGS')
  end
  
  
  def missed_days(user_email, missed)
    @error_message = 'You are currently missing the following days from your timesheet entries;<br/> '
    missed.each do |m|
      @error_message += m.to_s + '<br/>'
    end
    mail(:to => user_email, :subject => 'KE Timesheet Watcher - NOTICE: Your timesheet is missing entries')    
  end
  
end
